import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class YourCombiner extends Reducer<Text, Text, Text, Text> {
    public final Text outKey = new Text();
    public final Text outValue = new Text();

    @Override
    protected void reduce(Text key, Iterable<Text> values, Reducer<Text, Text, Text, Text>.Context context) throws IOException, InterruptedException {
        String word = key.toString();
        StringBuilder builder = new StringBuilder();
        for (Text v : values) {
            builder.append(v.toString()).append(',');
        }
        outKey.set(word);
        outValue.set(builder.substring(0, builder.length() - 1));
        context.write(outKey, outValue);
    }
}
